﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="BookPics.aspx.cs" Inherits="Maticsoft.Web.Admin.Shopping.BookPics" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript">
        $(function () {
            $("#chk_all").click(function () {
                $("input[name=chk_list]").each(function () {
                    $(this).attr("checked", true);
                })
            });
            $("#chk_no").click(function () {
                $("input[name=chk_list]").each(function () {
                    $(this).attr("checked", false);
                })
            });
            $(".status").each(function () {
                if ($(this).text() == "已审") {
                    $(this).css("color", "red");
                }
            })
        })
        function Del(flag) {
            var ids = "";
            $("#lists input:checkbox").each(function () {
                if ($(this).attr("checked") == true) {
                    if (ids.length > 0) {
                        ids += ",";
                    }
                    ids += $(this).val();
                }
            })
            if (flag == "2") {
                if (ids.length > 0) {
                    $("#ctl00_ContentPlaceHolder1_txtIds").val(ids);
                    return true;
                }
                else {
                    alert("请选择要审核记录");
                    return false;
                }
            }
            if (flag == "1") {
                if (ids.length > 0) {
                    if (confirm("确认删除？")) {
                        $("#ctl00_ContentPlaceHolder1_txtIds").val(ids);
                        return true;
                    }
                    else {
                        return false;
                    }
                }
                else {
                    alert("请选择要删除记录");
                    return false;
                }
            }
        }
    </script>
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#111111"
        style="border-collapse: collapse">
        <tr>
            <td width="100%" height="20" valign="top">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td height="30">
                            <img height="14" src="../images/book1.gif" width="20">&nbsp;产品管理&nbsp;&gt;&gt;&nbsp;产品列表&nbsp;&gt;&gt;&nbsp;产品图片
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td width="100%" height="1" background="../images/sp_bg.gif">
            </td>
        </tr>
    </table>
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td height="10">
            </td>
        </tr>
    </table>
    <!--  快速转换位置按钮  -->
    <table width="98%" border="0" cellpadding="0" cellspacing="1" bgcolor="#ccd9b9" align="center">
        <tr>
            <td height="26" background="../images/newlinebg3.gif">
                <table width="98%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td align="left">
                            &nbsp;<input type='button' class="coolbg np" onclick="location='BookPics.aspx?act=add&bookId=<%=Request.QueryString["bookId"] %>';"
                                value='添加图片' />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <!--  内容列表   -->
    <table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#CFCFCF" align="center"
        style="margin-top: 8px" id="lists">
        <tr bgcolor="#E7E7E7">
            <td height="28" colspan="5" background="../images/tbg.gif" style="padding-left: 10px;">
                ◆ 产品管理 &gt; 产品列表 &gt; 产品图片
            </td>
        </tr>
        <tr align="center" bgcolor="#FBFCE2">
            <td width="4%" height="25">
                选择
            </td>
            <td width="6%">
                ID
            </td>
            <td width="6%">
                名称
            </td>
            <td>
                图片
            </td>
            <td width="10%">
                操作
            </td>
        </tr>
        <asp:Repeater ID="Repeater1" runat="server">
            <ItemTemplate>
                <tr align='center' bgcolor="#FFFFFF" onmousemove="javascript:this.bgColor='#FCFDEE';"
                    onmouseout="javascript:this.bgColor='#FFFFFF';">
                    <td height="26">
                        <input name="chk_list" type="checkbox" id="chk_list" class="np" value="<%#Eval("bookPicId") %>" />
                    </td>
                    <td>
                        <%#Eval("bookPicId")%>
                    </td>
                    <td align='left'>
                        <%#Eval("BookName") %>
                    </td>
                    <td>
                        <img src="../../uploadpic/small/<%#Eval("Pic")%>" />
                    </td>
                    <td>
                        <a href="BookPics.aspx?act=edit&bookId=<%=Request.QueryString["bookId"] %>&bookPicId=<%#Eval("bookPicId") %>">
                            修改</a>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
        <tr bgcolor="#ffffff">
            <td height="36" colspan="5">
                &nbsp; <a href="javascript:void(0);" id="chk_all" class="coolbg">全选</a> <a href="javascript:void(0);"
                    class="coolbg" id="chk_no">取消</a>
                <asp:LinkButton ID="LinkButton1" runat="server" class="coolbg" OnClick="LinkButton1_Click"
                    OnClientClick="return Del('1');">删除</asp:LinkButton><input id="txtIds" type="text"
                        runat="server" style="display: none" />
            </td>
        </tr>
    </table>
    <table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#CFCFCF" align="center"
        style="margin-top: 8px">
        <tr bgcolor="#FFFFFF">
            <td>
                图片：
            </td>
            <td>
                <input id="File1" type="file" runat="server" style="height: 25px; width: 210px;" />
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td>
            </td>
            <td>
                <asp:Image ID="Image1" runat="server" ImageUrl="~/admin/images/booknopic.gif" Width="60px"
                    Height="80px" />
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td>
            </td>
            <td>
                <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="../images/button_ok.gif"
                    class="np" OnClick="ImageButton1_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
